package com.xlx.openLink;

import lombok.extern.slf4j.Slf4j;
import net.percederberg.mibble.MibLoader;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.retry.annotation.EnableRetry;
import org.springframework.scheduling.annotation.EnableScheduling;
/**
 * @author Admin
 */
@Slf4j
@SpringBootApplication
@EnableScheduling
@MapperScan("com.xlx.openLink.dao")
public class OpenLinkApplication {

    public static void main(String[] args) {
        SpringApplication.run(OpenLinkApplication.class, args);
    }


    @Bean
    public MibLoader mibLoader() {
        MibLoader mibload = new MibLoader();
        try {
            log.info(">>>>>加载mib文件<<<<<");
            mibload.addResourceDir("mibs");
            mibload.load("HOST-RESOURCES-MIB");
            mibload.load("RFC1213-MIB");
            mibload.load("BRIDGE-MIB");
            log.info(">>>>>加载mib文件结束<<<<<");
        } catch (Exception e) {
            e.printStackTrace();
            log.info(">>>>>>系统错误<<<<<");
        }
        return mibload;
    }


}
